package com.example.pan.model

import androidx.paging.PagingSource
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import kotlinx.coroutines.flow.Flow

@Dao
interface DriveDao {
    @Query("SELECT * FROM drive")
    fun getAll(): Flow<List<Drive>>

    @Insert
    fun insertAll(vararg drives: Drive)

    @Delete
    fun delete(drive: Drive)

    @Query("SELECT * FROM drive")
    fun pagingSource(): PagingSource<Int, Drive>
}
